package com.iss.view.order;

import com.iss.controller.OrderController;
import com.iss.model.Order;
import com.iss.view.view.Window;

import java.util.Calendar;
import java.util.Scanner;

public class CheckOutInfo extends Window {
    public static Order CHECKOUT_ORDER=new Order();
    private OrderController controller = new OrderController();
    @Override
    public String print() {
        Scanner scanner = new Scanner(System.in);
        String cmd="";
        System.out.println("离店信息：");
        //System.out.println("房间编号："
        // +CheckOutInfo.CHECKOUT_ORDER.getRoom().getRoomNO());
        System.out.println("房间编号："+"1001");
        System.out.println("入住："
                +CheckOutInfo.CHECKOUT_ORDER.getCustomer().getCustomerName());
        System.out.println("........");
        System.out.println("是否结算(y/n)？");
        cmd=scanner.next();
        if (cmd.equals("y")){
           boolean flag= controller.checkOut("NO001");
           if(flag){
               System.out.println("结算成功！");
           }
        }
        return cmd;
    }

    @Override
    public Window getNextWindow(String cmd) {




        return null;
    }
}
